package com.onLineCar.dispatch.rpc;

import com.onLineCar.common.core.domain.Result;
import com.onLineCar.dispatch.rpc.dto.TblOrder;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import javax.validation.constraints.NotBlank;
import java.util.List;

@FeignClient(name = "onLineCar-vehice")
@Component
public interface OrderRPC {

    @GetMapping("/tbl-order/selectOrderByOrderNum")
    Result<TblOrder> selectOrderNumber(@RequestParam(value = "orderNum") String orderNum);

    @GetMapping("/tbl-order/selectAllByUserId/{id}")
    Result<List<TblOrder>> selectAllByUserId(@PathVariable(value = "id") Long id);
}
